import 'package:flutter/material.dart';

//允许child超出parent的范围显示(推荐)
class OverflowBoxWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: new AppBar(
          title: new Text("OverflowBox"),
          leading: new BackButton(),
        ),
        body: new Container(
          color: Colors.green,
          width: 200,
          height: 200,
          padding: const EdgeInsets.all(5),
          child: OverflowBox(
            alignment: Alignment.topLeft,
            maxWidth: 300,
            maxHeight: 500,
            child: Container(
              color: Color(0x33FF00FF),
              width: 400,
              height: 400,
            ),
          ),
        ));
  }
}
